<template>
    <div class="mainApp">
        <div class="initing">
           <img src="@/assets/img/loading.gif" alt="">
           <p>初始化，请稍后...</p>
        </div>
    </div>
</template>

<script>
import {getParames} from '@/utils/util'
export default {
    mounted(){
        window.setTimeout(()=>{
            if(getParames('userid')){
                localStorage.setItem('userid',getParames('userid'))
                localStorage.setItem('school',getParames('school'))
                localStorage.setItem('classCode',getParames('classCode'))
                this.$router.push('/home')
                // localStorage.setItem('userType',getParames('userType'))
            }else{
                this.$toast('用户不存在')
            }
        },2000)
    }
}
</script>

<style lang="scss" scoped>
.initing{
    width: 100%;
    text-align: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
</style>